package com.duniptech.engine.core.simulation.api;

import com.duniptech.engine.core.modeling.api.IAtomic;
import com.duniptech.engine.core.modeling.api.IMessage;

public interface ISimulator {
	/**
	 * <P>This function initializes the simulation process.</P>
	 * <P>It initializes the data relative to the simulation process.</P>
	 * @param t Initial time of simulation.
	 */
	void initialize(double t);

	IAtomic getModel();
	ICoordinator getParent();
	double ta(double t);
	void lambda(double t);
	void deltfcn(double t);
	/**
	 * Returns the simulation time in which the last event took place.
	 * @return Simulation time in which the last event took place.
	 */
	double getTL();
	/**
	 * Returns the simulation time in which the next event will take place.
	 * @return Simulation time in which the next event will take place.
	 */
	double getTN();

	/**
	 * Sets the coordinator that contains to this component.
	 * @param parent coordinator that contains to this component.
	 */
	void setParent(ICoordinator parent);
	/**
	 * Sets the simulation time in which the last event took place.
	 * @param tL New simulation time in which the last event took place.
	 */
	void setTL(double tL);
	/**
	 * Sets the simulation time in which the next event will take place.
	 * @param tN New simulation time in which the next event will take place.
	 */
	void setTN(double tN);
	
	IMessage getInput();
	IMessage getOutput();
	
	void simInject(double e,IMessage message);
	void simInject(double e,String portName,Object value);
}
